import '../../models/pay_order_list_entity.dart';

final Map<int, String> payOrderStatus = {
  -1: '全部',
  0: '未审批',
  1: '付款中',
  3: '已完成',
};

final Map<int, String> preorderStatus = {
  0: '未经老板审批',
  1: '老板审批中',
  2: '老板审批拒绝，请重新编辑',
  3: '老板已完成审批',
};

final Map<int, String> channelOrderStatus = {
  0: '已修改重新提交审批',
  1: '未审批',
  20: '已驳回',
};

String getPaidOrderStatusDesc(PaidOrderInfo item) {
  if (item.isPreorder == true) {
    return preorderStatus[item.orderStatus] ?? '';
  } else if (item.orderStatus == 0) {
    return channelOrderStatus[item.channelOrderStatus] ?? '';
  } else {
    return payOrderStatus[item.orderStatus] ?? '';
  }
}
